Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Oracle Performance Tuning and Optimization
(Publisher: Macmillan Computer Publishing)
Author(s): Edward Whalen
ISBN: 067230886x
Publication Date: 04/01/96

Bookmark It

Search this book:
 
Previous Table of Contents Next


Data Transfer Rate

The data transfer rate should be given in the specifications for your disk drive. The data transfer rate is given in megabytes per second. Typically, the specifications provide values for both maximum and sustained data rates. With many disks, you can hit a maximum data transfer rate of over 15M per second but, in reality, the average sustained rate cannot achieve that. You can approximate the average sustained rate to be 75 percent of the maximum rate. In the disk-drive example begun in the preceding section, assume that the maximum rate is 10M/sec; the sustained rate is 7.5 M/sec. For the example drive, the data transfer rate in seconds per megabyte is determined as follows:

Seconds per MB = 1 / 7.5 MB/sec = 0.133 seconds per MB or
0.133 milliseconds per KB

Because a typical Oracle data block is 2K in size, the time it takes for a database block to be read from the disk drive is determined as follows:

Seconds per db block = 0.133 milliseconds per KB * 2 KB per block =
0.27 milliseconds per block

As you can see, relative to the time it takes to do a seek, the time it takes to actually transfer the data is small.

Queue Time

Up till now, all the values given in the example assume that nothing else is happening in the system and that you can get immediate access to the disk. Although many times this is true, there are many other times when other jobs on the system are using the disk and your I/O request must wait. This waiting in line is called queuing.

The time you spend in the queue is determined mainly by the OS and the load on the system. Depending on the hardware and OS, the I/O requests may be sorted within the device driver or on the controller (to reduce seeking). Instead of the heads moving back and forth across the disk in a completely random pattern, the sorted requests allow the heads to move more smoothly back and forth across the disk, accessing data in order, based on where on the disk the data is located. Although sorting the data requests quite often reduces seek times, your I/O requests may spend more time in the queue.

This type of sorting is typically referred to as elevator sorting. Think of how an elevator works: If you get in an elevator at the 2nd floor and want to go to the 10th floor, the elevator will let you off at the 10th floor before going to the 20th floor, even if someone pressed the button for the 20th floor before you requested the 10th floor. It is much more efficient for the elevator to let somebody off on the floor it is passing rather than in the order the floors are requested. This is similar to what happens to disk I/O requests (see Figure 14.5).


Figure 14.5   Elevator sorting.

When disk requests are sorted, the disk heads move in a more organized and smoother manner, thus increasing the overall throughput of the disk request. Although increasing this throughput can sometimes reduce the access time for some requests, overall, performance time is increased.

The time you spend in the disk queues varies. The more activity on the disk, the longer the queues. When you reach the point at which where you cannot sustain the I/O rates requested, the queue time begins to account for more and more of the total I/O response time.

Disk Performance

The time it takes for a disk transfer to occur is the sum of the seek time, the rotational latency, and the transfer time. The following sections look at a few examples and characterize some disk drives. First, however, here’s a summary of the values discussed so far in this chapter:

Measurement Average Time in Milliseconds

Average seek time 8 to 15 msec
Single-track seek time 3 to 5 msec
Full-stroke seek time 15 to 25 msec
Seconds per revolution 8 to 15 msec
Average rotational latency 4 to 8 msec
Seconds per database block transfer 0.1 to 0.4 msec


NOTE:  The information in the preceding chart is derived from a typical “off-the-shelf” disk drive.

Consider this example: You want to find out how many I/Os per second a disk can sustain. Of course, that answer depends on whether the I/O is random or sequential. The following sections describe random I/Os (as are used in data files) and sequential I/Os (such as those used in the redo log files).

Random I/Os

The example in this section determines how many random I/Os per second you can sustain on a data drive. For this example, use the following values:

Average seek time 14 msec
Average rotational latency 5 msec
Data transfer time
(1 database block: 2,048 bytes in size)
0.27 msec
Queue time 0 msec

This formula calculates how long it takes to retrieve a block of data on average:

Avg. Seek Time + Rotational Latency + Data Transfer Time + Queue Time

For the current example, the data retrieval time is calculated as follows:

14 msec + 5 msec + 0.27 msec + 0 msec = 19.27 msec

What does this tell you about the number of I/Os per second the disk can sustain? Because you are not taking into account disk queuing and elevator sorting, this calculation is somewhat crude but it does give a ballpark figure. If you assume that the disk can return a 2,048K database block in 19.27 msec, the number of I/Os the disk can sustain is determined as follows:

I/O requests per second = 1 / second per I/O request = 1 / 19.27 msec
per I/O = 1 / 0.01927 sec per I/O = 52 I/Os per sec

By this crude calculation, the sample disk drive can roughly support 50 random I/Os per second per drive. This is consistent with information you have seen before (and now you know roughly how this number was derived).

When you start approaching this limit, other effects (such as disk queues) have greater influence on the access time.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.